package com.jmp.base;

import com.jmp.base.dto.*;
import one.stand.model.ResultModel;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface LiveApi {
    /**
     * 类型: 0直播 1短视频
     */
    int VIDEO_TYPE_LIVE = 0;
    int VIDEO_TYPE_VIDEO = 1;

    /**
     * 直播列表
     */
    @PostMapping("/live/list")
    ResultModel<LiveListVo> list(@RequestBody LiveListRequest request);

    /**
     * 创建
     */
    @PostMapping("/live/save")
    ResultModel save(@RequestBody LiveSaveRequest request);

    /**
     * 直播信息
     */
    @PostMapping("/live/info")
    ResultModel<LiveInfoResponse> info(@RequestBody LiveInfoRequest request);

    /**
     * 删除预告
     */
    @PostMapping("/live/remove")
    ResultModel remove(@RequestBody LiveRemoveRequest request);

    /**
     * 添加商品
     */
    @PostMapping("/live/goods/add")
    ResultModel goodsAdd(@RequestBody LiveGoodsAddRequest request);

    /**
     * 商品编辑
     */
    @PostMapping("/live/goods/update")
    ResultModel goodsUpdate(@RequestBody LiveGoodsUpdateRequest request);

    /**
     * 商品列表
     */
    @PostMapping("/live/goods/list")
    ResultModel<LiveGoodsListResponse> goodsList(@RequestBody LiveGoodsListRequest request);

    /**
     * 回调-观看人记录
     */
    @PostMapping("/live/back/view")
    ResultModel backView();

    /**
     * 回调
     */
    @PostMapping("/live/back")
    ResultModel back(@RequestBody LiveBackRequest request);

    /**
     * 开播
     */
    @PostMapping("/live/open")
    ResultModel<LiveOpenResponse> open(@RequestBody LiveOpenRequest request);

    /**
     * 退出
     */
    @PostMapping("/live/quit")
    ResultModel quit(@RequestBody LiveQuitRequest request);

    /**
     * 预告 超时
     */
    @PostMapping("/live/timeout")
    ResultModel timeout(@RequestBody LiveTimeoutRequest request);

    /**
     * 推流、断流通知
     */
    @PostMapping("/live/end")
    ResultModel end(@RequestBody LiveEndDto request);

    /**
     * 短视频: 列表大厅
     */
    @PostMapping("/live/video/list")
    ResultModel<LiveVideoListVo> videoList(@RequestBody LiveVideoListDto request);

    /**
     * 短视频: 客户端上传签名
     */
    @PostMapping("/live/video/save/sign")
    ResultModel<LiveVideoSaveSignVo> videoSaveSign(@RequestBody LiveVideoSaveSignDto request);

    /**
     * 短视频: 上传保存(可靠通知）
     */
    @PostMapping("/live/video/save/notify")
    ResultModel<LiveVideoSaveNotifyVo> videoSaveNotify();

    /**
     * 短视频: 发布
     */
    @PostMapping("/live/video/up")
    ResultModel videoUp(@RequestBody LiveVideoUpDto request);
}
